Type GUI_MainFactory

	Global firstFactory:GUI_MainFactory

	Field nextFactory:GUI_MainFactory

	Function Fetch:GUI_Main(name:String)
		Local factory:GUI_MainFactory=GUI_MainFactory.firstFactory
		While factory
			Local main:GUI_Main = factory.CreateMain(name)
			If main Then
				Return main
			End If
			factory = factory.nextFactory
		Wend		
	End Function
	
	Method New()
		nextFactory = GUI_MainFactory.firstFactory
		GUI_MainFactory.firstFactory = Self
	End Method

	Method CreateMain:GUI_Main(name:String) Abstract

End Type
